package simple

func uniqueOccurrences(arr []int) bool {

	dic := make(map[int]int, len(arr))
	for _, v := range arr {
		dic[v]++
	}

	countDic := make(map[int]struct{}, len(dic))
	for _, v := range dic {
		if _, ok := countDic[v]; ok {
			return false
		}
		countDic[v] = struct{}{}
	}

	return true
}
